import { defineStore } from 'pinia';

export const useUserStore = defineStore('user', {
    state: () => ({ name: '张三', age: 30 }),
    actions: {
        updateName(name: string) {
            this.name = name;
        }
    },
})

export type UserStore = ReturnType<typeof useUserStore>